import request from '@/utils/request'
// 获取全部节点列表
export const GetAllNodeService = (data) => request.post('/node/query', data)

// 获取选中的节点
export const GetNodeByName = (name) =>
  request.get('/node/queryByName?name=' + name)

// 获取节点状态、系统负载
export const GetLoadService = (name) =>
  request.get(`/node/queryByName?name=${name}`)

// 修改节点信息
export const ChangeNodeService = (data) =>
  request.post('/node/update/node ', data)

// 删除节点信息
export const DelNodeService = (id) => request.get(`/node/remove?id=${id}`)
export const SetNodeService = (nodeId, status) =>
  request.post(`/node/setStatus?nodeId=${nodeId}&status=${status}`)
